// import { defineAsyncComponent } from "vue";
// const files = import.meta.glob("./*.vue");
// const components = {};
// for (const path in files) {
//   const componentName = path.replace(/^\.\//, "").replace(/\.\w+$/, "");
//   components[componentName] = defineAsyncComponent(files[path]);
// }

// export default components;

import { defineAsyncComponent } from "vue";

const files = import.meta.glob("./components/*/*Attribute.vue");

const components = {};
for (const path in files) {
  const componentName = path
    .replace(/\.\/([^\/]+\/)+/, "")
    .replace(/\.\w+$/, "");
  components[componentName] = defineAsyncComponent(files[path]);
}

export default components;
